<?php

/**
 * ProvidenciaAcao form base class.
 *
 * @package    form
 * @subpackage providencia_acao
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $
 */
class BaseProvidenciaAcaoForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'cd_providencia_acao' => new sfWidgetFormInputHidden(),
      'cd_acao'             => new sfWidgetFormDoctrineChoice(array('model' => 'Acao', 'add_empty' => false)),
      'cd_usuario'          => new sfWidgetFormDoctrineChoice(array('model' => 'Usuario', 'add_empty' => false)),
      'de_providencia'      => new sfWidgetFormTextarea(),
      'deleted'             => new sfWidgetFormInputCheckbox(),
      'created_at'          => new sfWidgetFormDateTime(),
      'updated_at'          => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'cd_providencia_acao' => new sfValidatorDoctrineChoice(array('model' => 'ProvidenciaAcao', 'column' => 'cd_providencia_acao', 'required' => false)),
      'cd_acao'             => new sfValidatorDoctrineChoice(array('model' => 'Acao')),
      'cd_usuario'          => new sfValidatorDoctrineChoice(array('model' => 'Usuario')),
      'de_providencia'      => new sfValidatorString(array('max_length' => 4000)),
      'deleted'             => new sfValidatorBoolean(),
      'created_at'          => new sfValidatorDateTime(array('required' => false)),
      'updated_at'          => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('providencia_acao[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'ProvidenciaAcao';
  }

}
